<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>布客艺培商学院后台管理</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/xadmin.css">
		<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/main.css">
		<link rel="stylesheet" type="text/css" href="__STATIC__/admin/lib/layui/css/layui.css">
		<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
		<script src="__STATIC__/admin/lib/layui/layui.js"></script>
		<script type="text/javascript" src="__STATIC__/admin/js/xadmin.js"></script>
		<script src="https://cdn.bootcss.com/vue/2.5.11/vue.min.js"></script>
	</head>

	<body>
		<div class="page-content" style="overflow-y: scroll;overflow-x: hidden;padding: 20px;position: static;">
			<div class="layui-form layui-form-pane" id="form">
				<div class="layui-form-item">
					<div class="layui-row">
						<div class="layui-col-xs6">
							<div class="layui-inline">
								<label class="layui-form-label">活动标题</label>
								<div class="layui-input-inline">
									<input type="text" placeholder="如：省钱风暴，围观省钱" autocomplete="off" class="layui-input" v-model="formData.activity_title">
								</div>
							</div>
						</div>
						<div class="layui-col-xs6 ar">
							<div class="layui-inline" style="margin-right: 0;">
								<label class="layui-form-label">商品标题</label>
								<div class="layui-input-inline" style="margin-right: 0;">
									<input type="text" placeholder="如：爱特街舞新星卡" autocomplete="off" class="layui-input" v-model="formData.goods_title">
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-row">
						<div class="layui-col-xs6">
							<div class="layui-inline">
								<label class="layui-form-label">团购达标人数</label>
								<div class="layui-input-inline">
									<input type="text" v-model="formData.max_num" autocomplete="off" class="layui-input">
								</div>
							</div>
						</div>
						<div class="layui-col-xs6 ar">
							<div class="layui-inline" style="margin-right: 0;">
								<label class="layui-form-label">联系号码</label>
								<div class="layui-input-inline" style="margin-right: 0;">
									<input type="text" v-model="formData.owner_tel" autocomplete="off" class="layui-input" placeholder="座机或手机号码">
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-row">
						<div class="layui-col-xs6">
							<div class="layui-inline">
								<label class="layui-form-label">活动开始日期</label>
								<div class="layui-input-inline">
									<input type="text" placeholder="该天的00:00:00" name="start_time" id="start_time" autocomplete="off" class="layui-input" v-model="formData.start_time">
								</div>
							</div>
						</div>
						<div class="layui-col-xs6 ar">
							<div class="layui-inline" style="margin-right: 0;">
								<label class="layui-form-label">活动结束日期</label>
								<div class="layui-input-inline" style="margin-right: 0;">
									<input type="text" placeholder="该天的23:59:59" name="end_time" id="end_time" autocomplete="off" class="layui-input" v-model="formData.end_time">
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-row">
						<div class="layui-col-xs6">
							<div class="layui-inline">
								<label class="layui-form-label">原价</label>
								<div class="layui-input-inline">
									<input type="text" autocomplete="off" class="layui-input" v-model="formData.old_price">
								</div>
							</div>
						</div>
						<div class="layui-col-xs6 ar">
							<div class="layui-inline" style="margin-right: 0;">
								<label class="layui-form-label">底价</label>
								<div class="layui-input-inline" style="margin-right: 0;">
									<input type="text" autocomplete="off" class="layui-input" v-model="formData.new_price">
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-row">
						<div class="layui-col-xs6">
							<div class="layui-inline upload-img-box">
								<div class="layui-form-label">
									<h1>活动主图</h1>
									<p class="upload-img-msg">建议上传2M以下</p>
									<p class="upload-img-msg">640X1920像素</p>
								</div>
								<div class="layui-input-inline img-box">
									<div class="layui-upload-drag upload_demo_btn test-upload" id="upload1" lay-data="{'url': '/upload-img-1.html',id: 1 }">
										<i class="layui-icon"></i>
										<p>点击上传，或将文件拖拽到此处</p>
									</div>
									<div class="layui-upload-list " id="demo1">
										<img class="layui-upload-img" id="demo1_img">
										<p id="demo1_img_text"></p>
									</div>
								</div>
							</div>
						</div>
						<div class="layui-col-xs6 ar">
							<div class="layui-inline upload-img-box" style="margin-right: 0;">
								<div class="layui-form-label">
									<h1>公众号二维码</h1>
									<p class="upload-img-msg">建议上传2M以下</p>
									<p class="upload-img-msg">300X300像素</p>
								</div>
								<div class="layui-input-inline img-box">
									<div class="layui-upload-drag upload_demo_btn test-upload" id="upload2" lay-data="{url: '/upload-img-2.html'}">
										<i class="layui-icon"></i>
										<p>点击上传，或将文件拖拽到此处</p>
									</div>
									<div class="layui-upload-list " id="demo2">
										<img class="layui-upload-img" id="demo2_img">
										<p id="demo2_img_text"></p>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-row">
						<div class="layui-col-xs6">
							<div class="layui-inline upload-img-box">
								<div class="layui-form-label">
									<h1>活动规则</h1>
									<p class="upload-img-msg">建议上传2M以下</p>
									<p class="upload-img-msg">640X1920像素</p>
								</div>
								<div class="layui-input-inline img-box">
									<div class="layui-upload-drag test-upload upload_demo_btn" id="upload3" lay-data="{url: '/upload-img-3.html'}">
										<i class="layui-icon"></i>
										<p>点击上传，或将文件拖拽到此处</p>
									</div>
									<div class="layui-upload-list" id="demo3">
										<img class="layui-upload-img" id="demo3_img">
										<p id="demo3_img_text"></p>
									</div>
								</div>
							</div>
						</div>
						<div class="layui-col-xs6 ar">
							<div class="layui-inline upload-img-box" style="margin-right: 0;">
								<div class="layui-form-label">
									<h1>品牌介绍</h1>
									<p class="upload-img-msg">建议上传2M以下</p>
									<p class="upload-img-msg">640X1920像素</p>
								</div>
								<div class="layui-input-inline img-box">
									<div class="layui-upload-drag test-upload upload_demo_btn" id="upload4" lay-data="{url: '/upload-img-4.html'}">
										<i class="layui-icon"></i>
										<p>点击上传，或将文件拖拽到此处</p>
									</div>
									<div class="layui-upload-list" id="demo4">
										<img class="layui-upload-img" id="demo4_img">
										<p id="demo4_img_text"></p>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-row">
						<div class="layui-col-xs6">
							<div class="layui-inline">
								<label class="layui-form-label">每次最多砍</label>
								<div class="layui-input-inline">
									<input type="text" v-model="formData.max_kan_num" autocomplete="off" class="layui-input" placeholder="每人每次最多砍多少元">
								</div>
							</div>
						</div>
						<div class="layui-col-xs6 ar">
							<div class="layui-inline upload-img-box" style="margin-right: 0;">
								<div class="layui-form-label">
									<h1>客服微信</h1>
									<p class="upload-img-msg">建议上传2M以下</p>
									<p class="upload-img-msg">300X300像素</p>
								</div>
								<div class="layui-input-inline img-box">
									<div class="layui-upload-drag test-upload upload_demo_btn" id="upload5" lay-data="{url: '/upload-img-5.html'}">
										<i class="layui-icon"></i>
										<p>点击上传，或将文件拖拽到此处</p>
									</div>
									<div class="layui-upload-list" id="demo5">
										<img class="layui-upload-img" id="demo5_img">
										<p id="demo5_img_text"></p>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>

				<div class="layui-form-item" v-for="(item,index) in formData.store">
					<label class="layui-form-label">门店{{index + 1}}</label>
					<div class="layui-input-block store-box">
						<input type="text" class="layui-input" v-model="item.name" :placeholder="`请填写门店${index + 1}的名字，如赣州章贡区店`">
						<button class="layui-btn layui-btn-primary" @click="addStore">添加门店 </button>
						<button class="layui-btn layui-btn-primary" @click="spliceStore(index)">删除该店 </button>

					</div>
				</div>
				<div class="layui-form-item">
					<button class="layui-btn" id="submit" @click.stop="save">保存</button>
				</div>
			</div>
		</div>
		<div class="page-content-bg"></div>
		<script type="text/javascript">
			var userId = "{$user_id}";
			var templateId = "{$template_id}";
			var script = document.createElement("script");
			script.type = "text/javascript";
			script.src = "/static/user/js/template"+templateId+".js";
			document.body.appendChild(script); 
		</script>
	</body>
</html>